_Pragma("once");

#include <string>
#include <string_view>

#include "common.h"
#include "HalUtility.h"
#include "ExtendDevice.h"
#include "SwitchDetectorConfigInfo.h"

class LoopManager;
/**
 * @author lizb
 */
class AcSwitchDetector : public ExtendDevice {
public:

    AcSwitchDetector(DummyChannel& channel, const ExtendDeviceType& deviceType, const std::string& deviceActknowlege);
    bool initialize() noexcept override;

    bool updateInformation() override;

    bool analysisSwitchStatus(const std::string& loopStatus);

    std::string mresponseString, mswitchString;

    std::string mswitchMode;
    std::string mloopSwitchStatus;

    SwitchDetectorConfigInfo mconfigInfo;

    LoopManager& mloopManager;
};
